<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meat name="viewpoet" content="with=device-width, initial-scale=1.0">
        <title>Document</title>
</head>

<body>
    <div id="app">
        <h3>小黑水果店</h3>
        <ul>
            <!-- 
            <li>苹果</li>
            <li>西瓜</li>
            <li>火龙果</li>
            <li>梨</li>
             -->
            <!-- 如果你用不上index，可以直接写成v-for="item in list" -->
            <li v-for="(item,index) in list">{{index}} -- {{item}}</li>
        </ul>
    </div>
    <!-- 引入的是开发版本包 - 包含完整的注释和警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                list: ['西瓜', '苹果', '火龙果', '莲雾']
            }
        })
    </script>

</body>

</html>